#include <iostream>
#include <cmath>
using namespace std;

void along(int Along)
{
    if (Along < 3)
    {
        cout << '-';
    }
    else
    {
        if (Along >= 3)
            along(Along / 3);
        for (int i = 1; i <= Along / 3; i++) // 这儿应该是  Along/3  假如是你之前的话  打印较多的空格  你仔细看一下
            cout << " ";
        if (Along >= 3)
            along(Along / 3);
    }
}

int main()
{
    int n;
    while (cin >> n)
    {
        int Along = (int)pow(3.0, n);
        along(Along);
        cout << endl;
    }
    return 0;
}